//
//  Eyepiece+WatermarkOutput.swift
//  WatermarkCamera
//
//  Created by AxcLogo on 4/7/2024.
//

import UIKit
import Foundation

extension Eyepiece {
    /// 水印输出链对象
    class Watermark {
        // Lifecycle

        init(image: UIImage) {
            guard let picture = GPUImagePicture(image: image) else { return }

            picture.processImage()

            self.output = picture

            self.blendFilter = BlendCoincidence()
        }

        init(view: UIView) {
            let element = GPUImageUIElement(view: view)

            self.output = GPUImageOutput()

            self.blendFilter = BlendCoincidence()
        }

        // Internal

        // 输出

        var output: GPUImageOutput?

        // 混合模式滤镜

        var blendFilter: GPUImageFilter = .init()
    }
}
